<!--
 * @FilePath     : /study_code/jquery/api-get.html
 * @Description  : jqCollection.get(index) api
 * @Date         : 2025-04-17 08:53:56
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-17 09:22:45
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <!-- <link rel="stylesheet" href="" /> -->
  </head>
  <body>
    <img src="https://www.fangyinggui.online/test/images/Snipaste_2025-04-17_09-11-41.jpeg" />
    <img src="https://www.fangyinggui.online/test/images/Snipaste_2025-04-17_09-11-45.jpeg" />

    <script src="/jquery/dist/jquery.min.js"></script>
    <script>
      // get api 调用有参数
      console.log(1, $('img').get(0)) // 获取所有图片集合，第1个图片 DOM 元素

      // api 无参
      console.log(2, $('img').get()) // {Array} [img, img] length: 2

      // 对比下面的集合
      console.log(3, $('img')) // {Object}
    </script>
  </body>
</html>
